]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
gdm/util: Clear the request if user verifier connection is closed
authorMarco Trevisan (Treviño) <mail@3v1n0.net>
Wed, 17 Sep 2025 17:04:46 +0000 (19:04 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 5 Feb 2026 16:09:29 +0000 (17:09 +0100)
Similarly to previous commit, in case the user verifier connection is
closed we should just clear the user verifier instance, since starting
from this point is going to be just invalid.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3885>
(cherry picked from commit 91a736a09ed9f5e2d11c733535b479fbf4f4fddf)

js/gdm/util.js

index 8cd18f003bef5938e9ae89398522970da0e682b7..f75c581a98ad7f9cf555c87f50ff893da71f12ed 100644 (file)
@@ -200,6 +200,7 @@ export class ShellUserVerifier extends Signals.EventEmitter {
     _clearUserVerifier() {
         if (this._userVerifier) {
             this._disconnectSignals();
+            this._userVerifier.get_connection().disconnectObject(this);
             this._userVerifier.run_dispose();
             this._userVerifier = null;
             if (this._userVerifierChoiceList) {
@@ -508,6 +509,8 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             this._clearUserVerifier();
             this._userVerifier = await this._client.open_reauthentication_channel(
                 userName, this._cancellable);
+            this._userVerifier.get_connection().connectObject('closed',
+                () => this.clear(), this);
         } catch (e) {
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
                 return;
@@ -540,6 +543,8 @@ export class ShellUserVerifier extends Signals.EventEmitter {
             this._clearUserVerifier();
             this._userVerifier =
                 await this._client.get_user_verifier(this._cancellable);
+            this._userVerifier.get_connection().connectObject('closed',
+                () => this.clear(), this);
         } catch (e) {
             if (e.matches(Gio.IOErrorEnum, Gio.IOErrorEnum.CANCELLED))
                 return;